import utils from "@/js/utils";
import {
    serverUrl
} from "@/js/settings";
import request from "@/js/request";
import moment from "./moment";

import "@/scss/base.scss";
import "@/scss/common.scss";
import "./index.scss";


$(function() {
    var countDownTime = parseInt(9); //在这里设置每道题的答题时长
    function countDown(countDownTime) {
        var timer = setInterval(function() {
            if (countDownTime >= 0) {
                showTime(countDownTime);
                countDownTime--;
            } else {
                clearInterval(timer);
                // alert("计时结束,给出提示");

            }
        }, 1000);
    }
    countDown(countDownTime);

    function showTime(countDownTime) { //这段是计算分和秒的具体数
        var minute = Math.floor(countDownTime / 60);
        var second = countDownTime - minute * 60;
        $("#countDownTime").text(second);
        $("#countDownTime").css("margin", "0 auto")
    }
})